package lab02.test16;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
      leap:  while (true) {
            System.out.println("┏ -------------------------------------------- ┓");
            System.out.println("请选择你的计算方式：");
            System.out.println("┣----------------------------------------------┫");
            System.out.println("┇ 加法请按_1");
            System.out.println("┇ 减法请按_2 ");
            System.out.println("┇ 乘法请按_3 ");
            System.out.println("┇ 除法请按_4 ");
            System.out.println("┇ 退出请按0");
          System.out.println("┣----------------------------------------------┫");
            Scanner in = new Scanner(System.in);
            int i=0;
            i=in.nextInt();
if(i==1) {
    Add add = new Add();
    System.out.println("请输入加数和被加数：");
    add.addend = in.nextDouble();
    add.augend = in.nextDouble();
    add.Add();
}
if(i==2) {
    Minus minus = new Minus();
    System.out.println("请输入减数和被减数：");
    minus.minuend = in.nextDouble();
    minus.subtrahend = in.nextDouble();
    minus.Minus();
}
if(i==4) {
    Division division = new Division();
    System.out.println("请输入除数和被除数：");
    division.dividend = in.nextDouble();
    division.divisor = in.nextDouble();
    division.Division();
}
          if(i==3) {
              Multiplication multiplication = new Multiplication();
              System.out.println("请输入做乘法的两个数：：");
              multiplication.numble1 = in.nextDouble();
              multiplication.numble2 = in.nextDouble();
              multiplication.Multiplication();
          }
          if(i==0){
    break leap;
          }
        }
    }
}
